<template>
    <div>
        <van-nav-bar leftArrow
                     title="搜索结果"
                     @click-left="$router.go(-1)"
        ></van-nav-bar>


        <form action="/">
            <van-search placeholder="请输入商品名称"
                        v-model="searchValue"
                        @search="search"
            />
        </form>
    </div>

</template>
<script>
    export default {
        data() {
            return {
                searchValue: ''
            }
        },
        created() {
            console.log(this.$route);
            this.searchValue = this.$route.query.searchValue;
        },
        methods: {
            search(val) {
                alert(val);


            }
        }




    }




</script>
